package com.tencent.mapper;

import com.tencent.entity.Sport;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author: Fame
 * @date: 2022-08-31 09:32
 * @description:
 */
public interface SportMapper {

    @Results(id = "sport",value = {
            @Result(property = "id",column = "s_id"),
            @Result(property = "name",column = "s_name"),
            @Result(property = "duration",column = "s_duration"),
            @Result(property = "cycle",column = "s_cycle"),
            @Result(property = "consume",column = "s_consume"),
            @Result(property = "level",column = "s_level")
    })
    @Select("select * from t_sport where s_level =#{level}")
    List<Sport> getByLevel(String level);
}
